function MonitorPointController(){
    var service=new Object();
    service.url=host+"/environment-protection"+"/monitor/point";
    /**
      *加载指定组织下的所有监控点 
      *@param orgId  指定组织Id 
      */
     service.getMonitorPointsByOrgId=function(orgId,onSuccess){
	     var orgIdStr=orgId;
		 var requestUrl=this.url+"/list/by/org";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   orgId:orgIdStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *加载所有的监控点列表 
      */
     service.getAllMonitorPoints=function(onSuccess){
		 var requestUrl=this.url+"/list/all";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *加载指定监控点基础信息 
      *@param monitorPointId  待加载监控点的Id 
      */
     service.getMonitorPointBaseInfoById=function(monitorPointId,onSuccess){
	     var monitorPointIdStr=monitorPointId;
		 var requestUrl=this.url+"/base/info";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   monitorPointId:monitorPointIdStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *修改监控点基础信息,全部 
      *@param baseInfo  修改后监控点的基础信息 
      */
     service.updateMonitorPointBaseInfoById=function(baseInfo,onSuccess){
	     var baseInfoStr=JSON.stringify(baseInfo);
		 var requestUrl=this.url+"/base/info/update";
         $.ajax({
             url:requestUrl,
             type:'Post',
             data:{
                   baseInfo:baseInfoStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *加载组织和监控点树 
      */
     service.getMonitorPointTree=function(onSuccess){
		 var requestUrl=this.url+"/tree";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    return service;
}
